{% load filter %}
{% extends '1base.html' %}
{% block title %}
<title>Wow Dkp Engine</title>
<meta name="Keywords" content="wow,dkp"/>
<meta name="description" content="A wow dkp system" />
<script type="text/javascript" src="/static/javascript/jquery.tablesorter.js"></script>
<script type="text/javascript" id="js">
$(document).ready(function() {
	// call the tablesorter plugin
	$('table').tablesorter();
});
</script>

<script type="text/javascript">
  $(document).ready(function(){
	$(".datalist TBODY TR").mouseover(function(){
	  $('TD',this).css("background-color","#32b16c");
	}).mouseout(function(){
	  $('TD',this).css("background-color","#b5edbc");
	}).click(function(){
	  var gourl = $('TD A',this).attr("href");
	  window.location.href=gourl;
	  return false;
	});
  });
</script>

<style type="text/css" media="screen">
	th.header { 
	cursor: pointer;
} 
</style>
{% endblock %}
{% block headline %}
{% endblock %}
{% block secondmenu %}
{% include 'second_menu.html'%}
{% endblock %}
{% block content %}
<table class="tablesorter datalist" cellspacing="0" style="border-collapse:collapse">
	<thead>
	<tr>
		<th>{{ multi_language.ca_number }}</th>
		<th>{{ multi_language.ca_players }}</th>
		<th>{{ multi_language.ca_class }}</th>
		<th>{{ multi_language.ca_race }}</th>
		<th>{{ multi_language.ca_attend }}</th>
		<th>{{ multi_language.ca_earn }}</th>
		<th>{{ multi_language.ca_adjust }}</th>
		<th>{{ multi_language.ca_reward }}</th>
		<th>{{ multi_language.ca_punish }}</th>
		<th>{{ multi_language.ca_cost }}</th>
		<th>{{ multi_language.ca_current }}</th>
	</tr>
	</thead>
	<tbody>
	{% for player in billboard %}
	<tr>
		<td style="color:#fff"><b>{{ forloop.counter }}</b></td>
		<td><b><a href="/pub/players/{{ player.player.player_name }}" style='color:{{ player.player.player_class|classcolor }}'>{{ player.player.player_name }}</a></b></td>
		<td><div style="background-image:url('/static/images/wow/class/{{ player.player.player_class }}.png');width:21px;height:21px;margin-left:auto;margin-right:auto;"></div></td>
		<td><div style="background-image:url('/static/images/wow/race/{{ player.player.player_race }}-{{ player.player.player_sex }}.png');width:21px;height:21px;margin-left:auto;margin-right:auto;"></div></td>
		<td style="color:#fdb04a;font-weight:bold;">{{ player.attend_rate }}%</td>
		<td style="color:#66ee66;font-weight:bold;">{{ player.earn }}</td>
		<td style="color:#66ee66;font-weight:bold;">{{ player.adjust }}</td>
		<td style="color:#66ee66;font-weight:bold;">{{ player.reward }}</td>
		<td style="color:#ff6666;font-weight:bold;">{{ player.punishment }}</td>
		<td style="color:#ff6666;font-weight:bold;">{{ player.cost }}</td>
		<td style="color:#0084c9;font-weight:bold;">{{ player.current_score }}</td>
	</tr>
	{% endfor %}
	</tbody>
</table>
<div id="paginate">
	{% if show_prev %}
		<span id="prev" class="paginate-button"><a href="/pub/players/page/{{ prev }}">{{ multi_language.ca_prev }}</a></span>
	{% endif %}

	{% for i in pages %}
		{% ifequal i page %}
			{{ i }}
		{% else %}
			<a href="/pub/players/page/{{ i }}">{{ i }}</a>
		{% endifequal %}
	{% endfor %}

	{% if show_next %}
		<span id="next" class="paginate-button"><a href="/pub/players/page/{{ next }}">{{ multi_language.ca_next }}</a></span>
	{% endif %}
</div>

{% endblock%}
{% block siderbar %}
	{% include 'forumSiderbar.html' %}
{% endblock%}